home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 038a / qbcmnt11.zip / COMMENTS.DOC < prev    next >
Text File  |  1991-02-26  |  49KB  |  844 lines

  1. ┌┬──────────────────────────────────────────────────────────────────────────┬┐
  2. ││                          COMMENTS - Version 1.1                          ││
  3. ││                                                                          ││
  4. ││                        (c) 1991 by LAMCO Software                        ││
  5. ││                                                                          ││
  6. ││                  The program that will add comments for                  ││
  7. ││                  you in any of your QuickBASIC listings                  ││
  8. └┴──────────────────────────────────────────────────────────────────────────┴┘
  9.  
  10. ┌┬──────────────────────────────────────────────────────────────────────────┬┐
  11. ││  What is COMMENTS                                                        ││
  12. └┴──────────────────────────────────────────────────────────────────────────┴┘
  13.  
  14. Any serious reference manual about programming in any language says at least
  15. once that every programmer should use comments extensively.
  16.  
  17. Let's face it, that's the part of writting a program that everybody hates the
  18. most.
  19.  
  20. COMMENTS takes care of a great part of that burden for you by adding to your
  21. listing all the information it can gather from analyzing it.
  22.  
  23. COMMENTS makes a backup copy of your listing in a file that uses the same
  24. filename with a .BAK extension.
  25.  
  26. It also creates a separate file with a .STR extension that will contain the
  27. complete structure of your listing if there is at least one procedure.
  28.  
  29. The new file with a .BAS extension will contain your listing and the
  30. following :
  31.  
  32.      In the Main Module section :          For each procedure :
  33.  
  34.        - Name and type                       - Name and type
  35.        - Name of the module (file)           - Description
  36.        - Language used                       - Parameters
  37.        - Source of the program               - All the variables used
  38.        - Description                         - Module level declarations
  39.        - Requirements                            - CONST statements
  40.        - Command line parameters                 - TYPE structures
  41.        - Files listed in .MAK file               - DECLARE FUNCTION
  42.        - All the variables used                  - DECLARE SUB
  43.  
  44. COMMENTS doesn't modify your listing in any way. Everything that is added to
  45. your listing by COMMENTS is written inside a box that is added at the very
  46. beginning of the file or over the first line of a procedure (SUB or FUNCTION).
  47.  
  48. ┌┬──────────────────────────────────────────────────────────────────────────┬┐
  49. ││  What is added to the module level of your listing                       ││
  50. └┴──────────────────────────────────────────────────────────────────────────┴┘
  51.  
  52. There is one box for each kind of information that COMMENTS can gather from
  53. your listing. The boxes added to the module level will be :
  54.  
  55.      1 - The MAIN box that will contain the Name, Type, Module name, Language,
  56.          and Source of your listing.
  57.  
  58.      2 - The DESCRIPTION box contains the description of your program. You
  59.          must of course type in that description.
  60.  
  61.      3 - The REQUIREMENTS box. This box will list all that is required by your
  62.          program to work properly, that may be for example a CGA or VGA
  63.          monitor, or a special Quick Library, or a particular version of DOS.
  64.          Anything that is required by your program will be listed here.
  65.  
  66.      4 - The .MAK file box. If you use a .MAK file with your program, the
  67.          files listed in that .MAK file will be listed in that box.
  68.  
  69.      5 - The COMMAND LINE PARAMETERS box. If when compiled your program
  70.          requires or allows command line parameters, COMMENTS will prompt you
  71.          to type in the different parameters that are allowed along with a
  72.          short description. You should also write a line describing the syntax
  73.          of the command. Everything you will type in when prompted will be
  74.          enclosed in this box.
  75.  
  76.      6 - The VARIABLES box. This box will contain a list of all the different
  77.          variables and arrays that are used in the module level of your
  78.          program. Each variable and array is listed on a separate line so the
  79.          next time you load your listing in the QuickBASIC editing
  80.          environment, you may add a short description for each of these
  81.          variables and arrays.
  82.  
  83. ┌┬──────────────────────────────────────────────────────────────────────────┬┐
  84. ││  What is added to each procedure of your listing                         ││
  85. └┴──────────────────────────────────────────────────────────────────────────┴┘
  86.  
  87.      1 - The NAME box which tells the name of the procedure and whether it is
  88.          a subprogram or a function.
  89.  
  90.      2 - The DESCRIPTION box contains the description of the procedure.
  91.          COMMENTS prompts you to type it in whenever a new procedure is
  92.          analyzed.
  93.  
  94.      3 - The PARAMETERS box. If any variables, arrays, or TYPE structures are
  95.          passed to a procedure through parameters, COMMENTS will identify them
  96.          and list them in this box, one to a line, so you may later add a
  97.          description to each of them.
  98.  
  99.      4 - The VARIABLES box. Same as in the module level section, but contains,
  100.          of course only the variables and arrays used within the concerned
  101.          procedure.
  102.  
  103.      5 - Finally, the MODULE LEVEL DECLARATIONS box. This box contains each
  104.          declaration that must be made in the module level section of your
  105.          listing for the concerned procedure to work properly, except for DIM
  106.          statements.
  107.  
  108.          This means that if a TYPE structure is used in the procedure, the
  109.          TYPE declaration that is required in the module level will be written
  110.          in that box. If a constant is used, a CONST declaration will be
  111.          written. And a DECLARE SUB or DECLARE FUNCTION declaration will be
  112.          written in that box for each procedure that is called from within the
  113.          procedure.
  114.  
  115.          If you should eventually copy the procedure to another of your
  116.          listings, you can find out immediately by looking at this box what
  117.          are the declarations that you must add to the module level of this
  118.          new listing for that procedure to work properly. As for the DIM
  119.          statements, look in the PARAMETERS and VARIABLES boxes to find the
  120.          arrays used, and then add the propper DIM statements in the module
  121.          level or REDIM statements in the procedure itself.
  122.  
  123. Note :   All these boxes are added to your listing, whether they are required
  124.          or not. For example, if you do not use any variables in a given
  125.          procedure, the VARIABLES box for that procedure will contain a single
  126.          line saying "(none)". You may remove these unnecessary boxes if you
  127.          wish, but they may be useful since looking at the beginning of a
  128.          procedure tells you immediately what is in there and what is not.
  129.  
  130. ┌┬──────────────────────────────────────────────────────────────────────────┬┐
  131. ││  Requirements                                                            ││
  132. └┴──────────────────────────────────────────────────────────────────────────┴┘
  133.  
  134. In order for COMMENTS to work properly, your listings must be written in a
  135. certain way, but as you'll see, you probably already follow these conventions.
  136.  
  137.      1 - The last line of the module level of your listing must be an "END"
  138.          statement alone on one line. If you use more than one "END"
  139.          statement, replace all of them except the last one by "SYSTEM", or
  140.          use another QuickBASIC statement on the same line.
  141.  
  142.          For example, if you make a test that uses an "END" statement, as in
  143.          the following case,
  144.  
  145.            IF Level% = 5 THEN
  146.              END
  147.            ELSE
  148.              Level% = Level% + 1
  149.            END IF
  150.  
  151.          You can write the same test in any of the following ways :
  152.  
  153.            1 -   IF Level% = 5 THEN END ELSE Level% = Level% + 1
  154.  
  155.            2 -   IF Level% = 5 THEN
  156.                    CLS : END
  157.                  ELSE
  158.                    Level% = Level% + 1
  159.                  END IF
  160.  
  161.            3 -   IF Level% = 5 THEN             Note : CLS has no effect
  162.                    END : CLS                           since the program
  163.                  ELSE                                  will end before
  164.                    Level% = Level% + 1                 reaching it
  165.                  END IF
  166.  
  167.          The trick is simply not to write any "END" statement that is not the
  168.          last one alone on one line, and whatever is on that line must not be
  169.          a remark or a string within doublequotes.
  170.  
  171.      2 - All Variables, Arrays, Constants, TYPE Structures, Subprograms names,
  172.          Functions names, and Parameters as well as COMMAND LINE Parameters,
  173.          if any, must contain at least one lowercase letter.
  174.  
  175.          COMMENTS compares each string in your listing with its uppercase
  176.          equivalent. This goes much faster than comparing it against every
  177.          QuickBASIC reserved word, but requires the use of lowercase letters.
  178.  
  179.      3 - If you use labels before DATA statements at the beginning of the
  180.          module level part of your program, you should write them all in
  181.          uppercase. Otherwise, COMMENTS will list them as variables.
  182.  
  183. ┌┬──────────────────────────────────────────────────────────────────────────┬┐
  184. ││  Requirements (part 2)                                                   ││
  185. └┴──────────────────────────────────────────────────────────────────────────┴┘
  186.         
  187.          On the other hand, if you use labels after the "END" statement in
  188.          error-handling routines, you must slightly modify your listing in
  189.          the following way :
  190.  
  191.          DO NOT write an "END" statement before the error-handling
  192.          routines, but DO write one after the routines. Then run COMMENTS.
  193.          Afterwards, load your program into QuickBASIC, remove the "END"
  194.          statement that is after the error-handling routines and add an
  195.          "END" statement before the routines.
  196.  
  197.          If you don't modify your program in this way, COMMENTS will either
  198.          generate an error message and terminate or it won't copy the
  199.          error-handling routines in the new version of your listing.
  200.  
  201. As for everything else, you may write your program in any way that is
  202. acceptable to QuickBASIC.
  203.  
  204.  
  205. ┌┬──────────────────────────────────────────────────────────────────────────┬┐
  206. ││  How COMMENTS works                                                      ││
  207. └┴──────────────────────────────────────────────────────────────────────────┴┘
  208.  
  209. COMMENTS opens the file you have selected and then reads each line one by one.
  210. Each time a line is read, it is copied to a backup file. Then remarks and
  211. strings within doublequotes are removed from that line. All characters that
  212. are not numbers or letters are removed and each string left is then analyzed.
  213.  
  214. Statements such as CONST or DIM tell COMMENTS what the following strings are.
  215. Every important string found is stored in memory and when the whole file as
  216. been read and backed up, your original file is closed and reopened.
  217.  
  218. The file is then read again, only this time each line is copied to a temporary
  219. file with the same name as your listing but with a .TMP extension. As the file
  220. is read again, each string found that does not match its uppercase equivalent
  221. is compared to the strings in memory and stored according to what it is. This
  222. is why it is important that each variable, SubProgram name, and so forth,
  223. contain at least one lowercase letter. The other way around would have been to
  224. compare each string found with every QuickBASIC reserved word, which would
  225. take much more time.
  226.  
  227. Once the end of the module level is reached, the .TMP file is closed and a new
  228. file with a .NEW extension is opened. All the module level boxes containing
  229. the appropriate information are written to this file and the .TMP file that
  230. now contains the module level part of your original listing without any
  231. modification is then copied to the .NEW file.
  232.  
  233. ┌┬──────────────────────────────────────────────────────────────────────────┬┐
  234. ││  How COMMENTS works (part 2)                                             ││
  235. └┴──────────────────────────────────────────────────────────────────────────┴┘
  236.  
  237. The temporary file is then deleted and a new temporary file is opened.
  238. COMMENTS then reads the lines of the original file until the beginning of the
  239. first procedure. Then each new line read is copied to the temporary file while
  240. the listing is again analyzed.
  241.  
  242. Once the end of the first procedure is reached, the appropriate information
  243. and the temporary file are added to the .NEW file and this process is repeated
  244. until the whole listing has been analyzed.
  245.  
  246. Note : Anything that you write in your listing after the "END" statement or
  247.        above the "SUB" or "FUNCTION" statement in any procedure won't be
  248.        copied to the temporary file and therefore will not appear in the final
  249.        file.
  250.  
  251.        This allows you to write temporary remarks that you don't want in the
  252.        final version of your program. This is also the reason why you should
  253.        merge or copy any 'INCLUDE$ file after the "END" statement of the
  254.        module level.
  255.  
  256.  
  257. ┌┬──────────────────────────────────────────────────────────────────────────┬┐
  258. ││  About '$INCLUDE files and .MAK files                                    ││
  259. └┴──────────────────────────────────────────────────────────────────────────┴┘
  260.  
  261. COMMENTS is intended to be used with programs that use a single module. You
  262. can, however, use it with programs that use an '$INCLUDE file or with programs
  263. that use more than one module.
  264.  
  265.      - If your listing requires an '$INCLUDE file, merge or copy it in your
  266.        original listing after the "END" statement of the module level before
  267.        saving your listing.
  268.  
  269.        The merged '$INCLUDE file will not appear in the new version of your
  270.        listing if you have merged it after the "END" statement. On the other
  271.        hand, if you do not merge it, COMMENTS won't be able to identify the
  272.        Constants, TYPE structures, and procedures. Therefore, everything will
  273.        be listed as variables.
  274.  
  275.      - If you use more than one module, process them one by one. If you use an
  276.        '$INCLUDE file, merge it in each module.
  277.  
  278. ┌┬──────────────────────────────────────────────────────────────────────────┬┐
  279. ││  How to use COMMENTS                                                     ││
  280. └┴──────────────────────────────────────────────────────────────────────────┴┘
  281.  
  282. Write your program as you would usually do, but make sure you follow the
  283. requirements stated earlier in this document.
  284.  
  285. Don't write any remark you want to be in your program after the "END"
  286. statement of the module level or above the "SUB " or "FUNCTION" statement of
  287. any procedure.
  288.  
  289. Once your program is completed, save it in ASCII format and exit QuickBASIC.
  290.  
  291. Then call COMMENTS from the directory where your program is. If COMMENTS is in
  292. a subdirectory that appears in the PATH statement of your AUTOEXEC.BAT file,
  293. simply type COMMENTS on the command line and press [ENTER], otherwise, also
  294. type the path to the subdirectory where COMMENTS is.
  295.  
  296. Select your program from the list of files that appear on screen and answer
  297. each question as you are prompted.
  298.  
  299. ┌┬──────────────────────────────────────────────────────────────────────────┬┐
  300. ││  How to use COMMENTS - Answering prompts                                 ││
  301. └┴──────────────────────────────────────────────────────────────────────────┴┘
  302.  
  303.   ╔════════════════════════════════════════════════════════════════════════╗
  304.   ║ COMMENTS - Version 1.1                    (c) 1991 - by LAMCO Software ║
  305.   ╚════════════════════════════════════════════════════════════════════════╝
  306.   ╔══════════════╗ ╔═══════════════════════════════════════════════════════╗
  307.   ║ ATTRIB  .BAS ║ ║                                                       ║
  308.   ║ BIN2HEX .BAS ║ ║          QuickBASIC comments adding utility           ║
  309.   ║ BIOSCALL.BAS ║ ║                                                       ║
  310.   ║ BITS    .BAS ║ ║    Available to you through the Shareware concept     ║
  311.   ║ BOXES   .BAS ║ ║                                                       ║
  312.   ║ CALENDAR.BAS ║ ║      Please read the accompanying documentation       ║
  313.   ║ DOLLARS .BAS ║ ║                                                       ║
  314.   ║ DOSCALLS.BAS ║ ╚═══════════════════════════════════════════════════════╝
  315.   ║ EDIT    .BAS ║ ╔═══════════════════════════════════════════════════════╗
  316.   ║ ERROR   .BAS ║ ║                                                       ║
  317.   ║ FILEINFO.BAS ║ ║        Reading directory  -  Please wait ...          ║
  318.   ║ GCURSOR .BAS ║ ║                                                       ║
  319.   ║ HEX2BIN .BAS ║ ║      Please choose the file to add comments to.       ║
  320.   ║ KEYS    .BAS ║ ║                                                       ║
  321.   ║ MOUSSUBS.BAS ║ ║    [HOME] [END] [PgUp] [PgDn] [Up and Down arrows]    ║
  322.   ║ NEWBOXES.BAS ║ ║                                                       ║
  323.   ║ PARSE   .BAS ║ ║          [ENTER] to select - [ESC] to quit            ║
  324.   ║ STRINGS .BAS ║ ║                                                       ║
  325.   ╚══════════════╝ ╚═══════════════════════════════════════════════════════╝
  326.  
  327. Shown above is what appears on screen when COMMENTS is loaded. Only the
  328. files with a .BAS extension in the current directory will be listed and the
  329. first one will be highlighted.
  330.  
  331. If there are no .BAS files in the current directory, COMMENTS will display
  332. an error message and exit.
  333.  
  334. If there are more than 18 files with a .BAS extension in the current
  335. directory, use the cursor keys to highlight the listing you want to process
  336. and press [ENTER].
  337.  
  338. You may press [ESC] to exit the program.
  339.  
  340. For example purposes, let's select BOXES.BAS and walk through COMMENTS to
  341. show you how it works. Note that for your convenience, both versions of
  342. BOXES.BAS are included with COMMENTS. This listing is not copyrighted and
  343. you are free to use it in your listings. BOXES.BAS is a toolbox that was
  344. written to draw different kinds of boxes on screen in different listings.
  345. BOXES.BAK is the original listing while BOXES.BAS is the new file written
  346. by COMMENTS. The descriptions that appear in the PARAMETERS and VARIABLES
  347. boxes were added after, not by COMMENTS.
  348.  
  349. Once you have highlighted BOXES.BAS and pressed [ENTER], the following
  350. screen will appear :
  351.  
  352.   ╔════════════════════════════════════════════════════════════════════════╗
  353.   ║ COMMENTS - Version 1.1                    (c) 1991 - by LAMCO Software ║
  354.   ╚════════════════════════════════════════════════════════════════════════╝
  355.   ╔═════════════════════════════╗  ╔═══════════════════════════════════════╗
  356.   ║ Making backup copy of       ║  ║ Number of declared SubPrograms :    7 ║
  357.   ║                             ║  ║                                       ║
  358.   ║     BOXES.BAS               ║  ║ Number of declared Functions   :    0 ║
  359.   ║                             ║  ║                                       ║
  360.   ║         while reading it.   ║  ║ Number of CONST statements     :    0 ║
  361.   ║                             ║  ║                                       ║
  362.   ║ Backup filename is          ║  ║ Number of TYPE structures      :    0 ║
  363.   ║                             ║  ║                                       ║
  364.   ║     BOXES.BAK               ║  ║ Number of SubPrograms found    :    7 ║
  365.   ║                             ║  ║                                       ║
  366.   ║         Please wait ...     ║  ║ Number of Functions found      :    0 ║
  367.   ║                             ║  ║                                       ║
  368.   ║                             ║  ║ Command line parameters ?      :   No ║
  369.   ║                             ║  ║                                       ║
  370.   ║                             ║  ║ .MAK file required ?           :   No ║
  371.   ║                             ║  ║                                       ║
  372.   ║                             ║  ║                                       ║
  373.   ║                             ║  ║                                       ║
  374.   ╚═════════════════════════════╝  ╚═══════════════════════════════════════╝
  375.  
  376. At the beginning, all numbers are set to 0 and the "Command line parameters
  377. ?" and ".MAK file required ?" lines are not displayed. Each time an
  378. important information is found, the corresponding number is updated and
  379. when the whole file has been analyzed, the "Command line parameters ?" and
  380. ".MAK file required ?" lines will be printed with the appropriate "Yes" or
  381. "No".
  382.  
  383. You will then be prompted to press a key to continue.
  384.  
  385.   ╔════════════════════════════════════════════════════════════════════════╗
  386.   ║ COMMENTS - Version 1.1                    (c) 1991 - by LAMCO Software ║
  387.   ╚════════════════════════════════════════════════════════════════════════╝
  388.   ╔════════════════════════════════════════════════════════════════════════╗
  389.   ║ Enter name of program :                                                ║
  390.   ║                                                                        ║
  391.   ║   ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  ║
  392.   ║                                                                        ║
  393.   ║                                                                        ║
  394.   ║                                                                        ║
  395.   ║                                                                        ║
  396.   ║                                                                        ║
  397.   ║                                                                        ║
  398.   ║                                                                        ║
  399.   ║                                                                        ║
  400.   ║                                                                        ║
  401.   ║                                                                        ║
  402.   ║                                                                        ║
  403.   ║                                                                        ║
  404.   ║                                                                        ║
  405.   ║                                                                        ║
  406.   ║                                                                        ║
  407.   ╚════════════════════════════════════════════════════════════════════════╝
  408.  
  409. The above screen will then appear, with COMMENTS prompting you to enter the
  410. name of your program.
  411.  
  412. Type the name of your listing in the highlighted box.
  413.  
  414. Until you press [ENTER], [Up Arrow], or [Down Arrow], COMMENTS gives you
  415. WordStar-like editing capabilities. That is, you can use [INS] to toggle
  416. overwrite mode on and off, [HOME], [END], [^LEFT], [^RIGHT], [^Q] to erase
  417. the whole line, and [^Q-Y] to erase the end of the line from the cursor
  418. position.
  419.  
  420.   ╔════════════════════════════════════════════════════════════════════════╗
  421.   ║ COMMENTS - Version 1.1                    (c) 1991 - by LAMCO Software ║
  422.   ╚════════════════════════════════════════════════════════════════════════╝
  423.   ╔════════════════════════════════════════════════════════════════════════╗
  424.   ║ Enter name of program :                                                ║
  425.   ║                                                                        ║
  426.   ║    BOXES                                                               ║
  427.   ║                                                                        ║
  428.   ║                                                                        ║
  429.   ║ Select the Type of the program                      ╔═════════════╗    ║
  430.   ║                                                     ║ Application ║    ║
  431.   ║   [Up and Down arrows] - Move cursor                ║ Utility     ║    ║
  432.   ║                                                     ║ Toolbox     ║    ║
  433.   ║                [ENTER] - Select                     ║ Demo        ║    ║
  434.   ║                                                     ║ Game        ║    ║
  435.   ║   Enter type : ░░░░░░░░░░░░░░░░░░░░░░░              ║ Other       ║    ║
  436.   ║                                                     ╚═════════════╝    ║
  437.   ║                                                                        ║
  438.   ║                                                                        ║
  439.   ║                                                                        ║
  440.   ║                                                                        ║
  441.   ║                                                                        ║
  442.   ╚════════════════════════════════════════════════════════════════════════╝
  443.  
  444. Once you have pressed [ENTER], [Up Arrow], or [Down Arrow], the screen will
  445. be modified in the way shown above except for the "Enter type :" line and
  446. highlighted box. This appears only if you select "Other".
  447.  
  448. You can now select the type of your program by highlighting the appropriate
  449. description, using the [Up] or [Down] arrow. If the type of your program
  450. does not appear in the list, select "Other".
  451.  
  452. If you do select "Other", you again have access to WordStar-like editing
  453. capabilities until you press [ENTER], [Up Arrow], or [Down Arrow].
  454.  
  455.   ╔════════════════════════════════════════════════════════════════════════╗
  456.   ║ COMMENTS - Version 1.1                    (c) 1991 - by LAMCO Software ║
  457.   ╚════════════════════════════════════════════════════════════════════════╝
  458.   ╔════════════════════════════════════════════════════════════════════════╗
  459.   ║ Enter name of program :                                                ║
  460.   ║                                                                        ║
  461.   ║    BOXES                                                               ║
  462.   ║                                                                        ║
  463.   ║                                                                        ║
  464.   ║ Select the Type of the program                      ╔═════════════╗    ║
  465.   ║                                                     ║ Application ║    ║
  466.   ║   [Up and Down arrows] - Move cursor                ║ Utility     ║    ║
  467.   ║                                                     ║ Toolbox     ║    ║
  468.   ║                [ENTER] - Select                     ║ Demo        ║    ║
  469.   ║                                                     ║ Game        ║    ║
  470.   ║                                                     ║ Other       ║    ║
  471.   ║                                                     ╚═════════════╝    ║
  472.   ║                                                                        ║
  473.   ║ Enter source of program :                                              ║
  474.   ║                                                                        ║
  475.   ║   ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  ║
  476.   ║                                                                        ║
  477.   ╚════════════════════════════════════════════════════════════════════════╝
  478.  
  479. The next step is to type in the source of your program. In most cases, it
  480. is your name that you will type there but if the listing comes from a
  481. magazine or a book, or any other source, write the reference here.
  482.  
  483. Remember the WordStar-like editing capabilities. They apply here as well.
  484.  
  485.   ╔════════════════════════════════════════════════════════════════════════╗
  486.   ║ COMMENTS - Version 1.1                    (c) 1991 - by LAMCO Software ║
  487.   ╚════════════════════════════════════════════════════════════════════════╝
  488.   ╔════════════════════════════════════════════════════════════════════════╗
  489.   ║                      Enter description of program                      ║
  490.   ║                                                                        ║
  491.   ║                                                                        ║
  492.   ║  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  ║
  493.   ║  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  ║
  494.   ║  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  ║
  495.   ║  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  ║
  496.   ║  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  ║
  497.   ║  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  ║
  498.   ║  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  ║
  499.   ║  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  ║
  500.   ║  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  ║
  501.   ║  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  ║
  502.   ║  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  ║
  503.   ║  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  ║
  504.   ║  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  ║
  505.   ║  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  ║
  506.   ║                                                                        ║
  507.   ╚════════════════════════════════════════════════════════════════════════╝
  508.  
  509. Once you have entered the source of your listing, COMMENTS will prompt you for
  510. its description. The above screen will appear and you will again have access
  511. to editing capabilities.
  512.  
  513. In this case, though, [ENTER], [Up Arrow], and [Down Arrow] move the cursor
  514. up or down one line. You must press [ESC] to exit from this highlighted
  515. box. Don't worry about exceeding the length of the lines, COMMENTS provides
  516. wrap-around capabilities.
  517.  
  518. Note, however, that when you exit this box, COMMENTS will concatenate
  519. everything you have written into one line and will then break that line in
  520. as many lines as required to fit the text into the comment box that will be
  521. added to your listing, removing any double spaces in the process.
  522. Therefore, you may not include blank lines within the box while using
  523. COMMENTS, but you may do so when you later load the new version of your
  524. listing in QuickBASIC.
  525.  
  526. If you want to see what the text will look like in its final version, move
  527. the cursor to the upper left corner of the highlighted box and press the
  528. [BACKSPACE] key.
  529.  
  530.   ╔════════════════════════════════════════════════════════════════════════╗
  531.   ║ COMMENTS - Version 1.1                    (c) 1991 - by LAMCO Software ║
  532.   ╚════════════════════════════════════════════════════════════════════════╝
  533.   ╔══════════════════════════════════════════════╗ ╔═══════════════════════╗
  534.   ║ Select the Requirements of the program       ║ ║   (none)              ║
  535.   ║                                              ║ ║   DOS 2.x             ║
  536.   ║   [Up and Down arrows] - Move cursor         ║ ║   DOS 3.x             ║
  537.   ║                                              ║ ║   DOS 4.x             ║
  538.   ║                [ENTER] - Select/Unselect     ║ ║   CGA                 ║
  539.   ║                                              ║ ║   EGA                 ║
  540.   ║                  [ESC] - Exit                ║ ║   VGA or MCGA         ║
  541.   ║                                              ║ ║   Mouse               ║
  542.   ║                                              ║ ║   Mouse (optional)    ║
  543.   ╚══════════════════════════════════════════════╝ ║   Modem               ║
  544.   ╔══════════════════════════════════════════════╗ ║   Joystick            ║
  545.   ║                                              ║ ║   Printer             ║
  546.   ║                                              ║ ║   Other               ║
  547.   ║                                              ║ ║   Other               ║
  548.   ║                                              ║ ║   Other               ║
  549.   ║                                              ║ ║   Other               ║
  550.   ║                                              ║ ║   Other               ║
  551.   ║                                              ║ ║   Other               ║
  552.   ╚══════════════════════════════════════════════╝ ╚═══════════════════════╝
  553.  
  554. There are still two more things that only you can tell COMMENTS, the
  555. requirements of your program and the language you used to write it. But
  556. both are simple to do.
  557.  
  558. Shown above is the screen that prompts you for the requirements of your
  559. program. Use the [Up] and [Down] arrows to select each of the requirements
  560. that apply to your program. When all the requirements have been selected,
  561. press [ESC] to exit.
  562.  
  563. Every time you press [ENTER], the current selection that is highlighted
  564. will be marked. You remove a mark by pressing [ENTER] while highlighting a
  565. selection that is already marked.
  566.  
  567. When you press [ESC], all requirements marked will be included in the
  568. requirements box added to your listing.
  569.  
  570. If you need a requirement that is not written as an available selection,
  571. select any of the "Other" lines. COMMENTS will prompt you to type that
  572. requirement. Again, you have access to editing capabilities until you press
  573. [ENTER], [Up], or [Down] arrow. Should you notice too late that you've made
  574. a typing mistake, highlight the requirement line that contains the
  575. misspelled word, unselect it by pressing [ENTER], highlight another "Other"
  576. line, and type a new line.
  577.  
  578. The "Other" lines are provided so you can add such remarks as '$INCLUDE
  579. files, special libraries, or anything else that is required by your program
  580. to work properly.
  581.  
  582. Now, the language you used to write your program. Use the [Up] and [Down]
  583. arrows to highlight the version of QuickBASIC that you used or select
  584. "Other" if you used another BASIC language and press [ENTER].
  585.  
  586.   ╔════════════════════════════════════════════════════════════════════════╗
  587.   ║ COMMENTS - Version 1.1                    (c) 1991 - by LAMCO Software ║
  588.   ╚════════════════════════════════════════════════════════════════════════╝
  589.   ╔══════════════════════════════════════════════╗ ╔═══════════════════════╗
  590.   ║ Select the Requirements of the program       ║ ║   (none)              ║
  591.   ║                                              ║ ║   DOS 2.x             ║
  592.   ║   [Up and Down arrows] - Move cursor         ║ ║   DOS 3.x             ║
  593.   ║                                              ║ ║   DOS 4.x             ║
  594.   ║                [ENTER] - Select/Unselect     ║ ║ √ CGA                 ║
  595.   ║                                              ║ ║   EGA                 ║
  596.   ║                  [ESC] - Exit                ║ ║   VGA or MCGA         ║
  597.   ║                                              ║ ║   Mouse               ║
  598.   ║                                              ║ ║   Mouse (optional)    ║
  599.   ╚══════════════════════════════════════════════╝ ║   Modem               ║
  600.   ╔══════════════════════════════════════════════╗ ║   Joystick            ║
  601.   ║ Select language used in the program          ║ ║   Printer             ║
  602.   ║                                              ║ ║   Other               ║
  603.   ║              QuickBASIC V. 4.0               ║ ║   Other               ║
  604.   ║              QuickBASIC V. 4.5               ║ ║   Other               ║
  605.   ║                    Other                     ║ ║   Other               ║
  606.   ║                                              ║ ║   Other               ║
  607.   ║                                              ║ ║   Other               ║
  608.   ╚══════════════════════════════════════════════╝ ╚═══════════════════════╝
  609.  
  610. If your program uses Command Line Parameters, another screen will be
  611. displayed and COMMENTS will prompt you to enter the appropriate
  612. information.
  613.  
  614. To allow you to write each parameter on a different line, the editing
  615. capabilities inside this box are the same as when editing only one line.
  616. Each time you press [ENTER], [Up], or [Down] arrow, the cursor moves to the
  617. next line and you can no longer edit the previous line. To exit from that
  618. box, press [ENTER] on a blank line.
  619.  
  620.   ╔════════════════════════════════════════════════════════════════════════╗
  621.   ║ COMMENTS - Version 1.1                    (c) 1991 - by LAMCO Software ║
  622.   ╚════════════════════════════════════════════════════════════════════════╝
  623.   ╔════════════════════════════════════════════════════════════════════════╗
  624.   ║ Now processing : Module level                                          ║
  625.   ║                                                                        ║
  626.   ║ Variables found :    0                                Reading          ║
  627.   ╚════════════════════════════════════════════════════════════════════════╝
  628.   ╔════════════════════════════════════════════════════════════════════════╗
  629.   ║                                                                        ║
  630.   ║                                                                        ║
  631.   ║                                                                        ║
  632.   ║                                                                        ║
  633.   ║                                                                        ║
  634.   ║                                                                        ║
  635.   ║                                                                        ║
  636.   ║                                                                        ║
  637.   ║                                                                        ║
  638.   ║                                                                        ║
  639.   ║                                                                        ║
  640.   ║                                                                        ║
  641.   ║                                                                        ║
  642.   ╚════════════════════════════════════════════════════════════════════════╝
  643.  
  644. Once all the necessary information has been entered, the next screen to appear
  645. will be as shown above. Remember that all these screens were saved while
  646. analyzing BOXES.BAS with COMMENTS.
  647.  
  648. COMMENTS is now analyzing the module level section of the program. Each
  649. time a new variable (or array) is found, the appropriate number is
  650. displayed. When the "END" statement is reached, "Reading" is replaced by
  651. "Writing". COMMENTS then writes the appropriate boxes to the .NEW file and
  652. copies the temporary file after the boxes.
  653.  
  654.   ╔════════════════════════════════════════════════════════════════════════╗
  655.   ║ COMMENTS - Version 1.1                    (c) 1991 - by LAMCO Software ║
  656.   ╚════════════════════════════════════════════════════════════════════════╝
  657.   ╔════════════════════════════════════════════════════════════════════════╗
  658.   ║ Now processing : SUBPROGRAM DoubleBorderBox                            ║
  659.   ║                                                                        ║
  660.   ║ Variables found :    1        Procedure # 1 of 7      Reading          ║
  661.   ╚════════════════════════════════════════════════════════════════════════╝
  662.   ╔════════════════════════════════════════════════════════════════════════╗
  663.   ║                                                                        ║
  664.   ║                                                                        ║
  665.   ║                                                                        ║
  666.   ║                                                                        ║
  667.   ║                                                                        ║
  668.   ║                                                                        ║
  669.   ║                                                                        ║
  670.   ║                                                                        ║
  671.   ║                                                                        ║
  672.   ║                                                                        ║
  673.   ║                                                                        ║
  674.   ║                                                                        ║
  675.   ║                                                                        ║
  676.   ╚════════════════════════════════════════════════════════════════════════╝
  677.  
  678. COMMENTS then resumes reading the file and when it finds the first
  679. procedure, it will replace "Module level" by either "SUBPROGRAM" or
  680. "FUNCTION" and will display the name of the procedure it is reading. Again
  681. the number of variables found is shown. COMMENTS also tells how many
  682. procedures it will have to process and which is the one that is currently
  683. being read.
  684.  
  685. When COMMENTS finds an "END SUB" or "END FUNCTION" statement, actually the
  686. end of the procedure it was reading, a message and a highlighted box will
  687. appear on screen and COMMENTS will prompt you for the description of that
  688. procedure. Once you've typed it, COMMENTS will resume its reading.
  689.  
  690.   ╔════════════════════════════════════════════════════════════════════════╗
  691.   ║ COMMENTS - Version 1.1                    (c) 1991 - by LAMCO Software ║
  692.   ╚════════════════════════════════════════════════════════════════════════╝
  693.   ╔════════════════════════════════════════════════════════════════════════╗
  694.   ║ Now processing : SUBPROGRAM DoubleBorderBox                            ║
  695.   ║                                                                        ║
  696.   ║ Variables found :    1        Procedure # 1 of 7              Writing  ║
  697.   ╚════════════════════════════════════════════════════════════════════════╝
  698.   ╔════════════════════════════════════════════════════════════════════════╗
  699.   ║                     Enter description of procedure                     ║
  700.   ║                                                                        ║
  701.   ║  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  ║
  702.   ║  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  ║
  703.   ║  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  ║
  704.   ║  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  ║
  705.   ║  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  ║
  706.   ║  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  ║
  707.   ║  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  ║
  708.   ║  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  ║
  709.   ║  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  ║
  710.   ║  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  ║
  711.   ║                                                                        ║
  712.   ╚════════════════════════════════════════════════════════════════════════╝
  713.  
  714. When prompted to type the description of a procedure, the editing
  715. capabilities are the same as when entering the description of the program
  716. itself. Exit by pressing [ESC].
  717.  
  718. When the last procedure has been processed, the original .BAS file will be
  719. deleted (Remember that a copy with a .BAK extension was made when the file was
  720. read the first time) and the .NEW file is renamed with a .BAS extension.
  721.  
  722. COMMENTS will then display a message telling that it is writting the structure
  723. file and when this is completed, it will display another message telling you
  724. that the processing of your listing is completed and prompting you to press a
  725. key to exit the program.
  726.  
  727. When your computer is back to the command line, you should load QuickBASIC,
  728. call your program and then add remarks in the overstrike mode for each of
  729. the variables and parameters that COMMENTS has identified in your program.
  730.  
  731. If you wish, you may merge the structure file to the main module of your
  732. program since each line begins with an apostrophe and the whole file is
  733. written in the same format as the other information that was added to your
  734. listing.
  735.  
  736. Note that you can use COMMENTS before the final version of your program is
  737. completed. This might prove useful to find where there is a misspelled
  738. variable since both versions of that variable will be added to your listing
  739. in the variables list. Remember though that COMMENTS will write new boxes
  740. when you run it again on the new listing with a .BAS extension. If you use
  741. COMMENTS on a version of your program that is not the final one, delete the
  742. .BAS file after you've looked at it and rename the .BAK file with a .BAS
  743. extension so you use again your original listing.
  744.  
  745. ┌┬──────────────────────────────────────────────────────────────────────────┬┐
  746. ││  COMMENTS Limitations                                                    ││
  747. └┴──────────────────────────────────────────────────────────────────────────┴┘
  748.  
  749. COMMENTS will display an error message and terminate if your listing
  750. exceeds these limits :
  751.  
  752.         100 files with a .BAS extension in the current directory
  753.          25 files in a .MAK file
  754.  
  755.          60 Constants
  756.          25 TYPE structures
  757.          40 variables in any TYPE structure
  758.  
  759.         100 Subprograms
  760.          60 Functions
  761.  
  762.         100 different arrays in the whole listing
  763.         100 variables and arrays used within any procedure
  764.  
  765. COMMENTS will also terminate if there is no "END" statement at the end of
  766. the module level section of your listing.
  767.  
  768. Note : When COMMENTS terminates because of a problem, it doesn't erase any
  769.        file. Therefore you may find a ".BAK", ".TMP", or ".NEW" file in
  770.        your directory. These files need not be deleted since COMMENTS will
  771.        overwrite them the next time you use it for the same listing.
  772.  
  773. Also note that the original file is renamed only when the whole process is
  774. completed. So should COMMENTS stop because of any problem, DO NOT erase the
  775. ".BAS" file and rename the ".BAK" file. The ".BAS" file is your original
  776. listing. The ".BAK" file is a copy of it, but if COMMENTS stopped before it
  777. had time to copy all the lines of your original listing, the ".BAK" file is
  778. not complete.
  779.  
  780. If a problem occurs, note the error message and look at the ".BAK", ".TMP",
  781. and ".NEW" files. You will then easily find out why COMMENTS stopped.
  782.  
  783. ┌┬──────────────────────────────────────────────────────────────────────────┬┐
  784. ││  About Shareware                                                         ││
  785. └┴──────────────────────────────────────────────────────────────────────────┴┘
  786.  
  787. COMMENTS is distributed through the Shareware concept. You are therefore
  788. encouraged to make copies and give them to anyone who might use it. We
  789. would also greatly appreciate it if you help us make it available to more
  790. users by uploading it to any BBS you have access to.
  791.  
  792. The registration fee for COMMENTS is $ 20.00. Anyone who sends $ 30.00 or
  793. more will receive Version 2 as soon as it is available.
  794.  
  795. Please support the Shareware concept. If you use COMMENTS, send your
  796. registration fee to the following address:
  797.  
  798.                            LAMCO Software
  799.                            P.O. Box 46
  800.                            Postal Station P.A.T.
  801.                            Montreal, Quebec, Canada
  802.                            H1B 5K1
  803.  
  804. Please state the program name and the version number.
  805.  
  806. Help us make a better product available to you. Send us your suggestions
  807. and please report any problem.
  808.  
  809. COMMENTS was written with QuickBASIC version 4.5 and is intended to be used
  810. with either version 4.0 or 4.5 of QuickBASIC, but you may use it with other
  811. versions of QuickBASIC or other BASIC languages, as long as your listing
  812. was saved in ASCII format. If you use COMMENTS with another BASIC language
  813. and you find that COMMENTS doesn't work properly, please write to us,
  814. describing what happened. Maybe we can modify COMMENTS so Version 2 will
  815. accept the other BASIC languages as well or at least tell you how you could
  816. write your program so COMMENTS will work.
  817.  
  818.  
  819. ┌┬──────────────────────────────────────────────────────────────────────────┬┐
  820. ││  What's coming up in version 2.0                                         ││
  821. └┴──────────────────────────────────────────────────────────────────────────┴┘
  822.  
  823. When a .MAK file is used, Version 2 will be able to process all the modules
  824. and read the '$INCLUDE files. The Structure file will also indicate in which
  825. module is each procedure called.
  826.  
  827. Comments added to your listing will be updated rather than overwritten, so
  828. you won't have to type in the same information twice or more if you run
  829. COMMENTS more than once for the same listing.
  830.  
  831. Version 2 will also include configuration possibilities, so you can set the
  832. colors and type in only once options that you use often in your listings,
  833. such as Requirements, Source, or Language.
  834.  
  835. We will also, of course, consider any suggestion we will receive from you,
  836. the user.
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.